<?php
  
namespace adibilis\UserBundle\Form\Type;
  
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;
  
class RegistrationFormType extends BaseType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
    parent::buildForm($builder, $options);
    $builder
      ->add('firstname', null,  array('label' => 'profile.show.firstname', 'attr' => array('class' => 'inputText')))
      ->add('lastname', null, array('label' => 'profile.show.lastname','attr' => array('class' => 'inputText')))
      ->add('address', null, array('label' => 'profile.show.address','attr' => array('class' => 'inputText')))
      ->add('telephone', null, array('label' => 'profile.show.phone','attr' => array('class' => 'inputText')))
      ->add('locality', 'entity', array('label' => 'profile.show.locality',
                  'class'    => 'adibilisadminBundle:Locality',
                  'property' => 'locality'))
    ;
    }
  
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'adibilis\UserBundle\Entity\User'
        ));
    }
  
    public function getName()
    {
        return 'adibilis_user_registration';
    }
}